<template>
  <div>
    <div class="wrap">
      <TopicHead/>
      <Nav/>
    </div>
    <router-view/>
    <Footer/>
  </div>
  
</template>

<script>
  import TopicHead from './Head'
  import Nav from './Nav'
  import Footer from 'components/Footer'
  export default {
    name: 'index',
    mounted(){
      // 在不同的子页面发不同的请求获取
      this.$store.dispatch('getTabsData')
      this.$store.dispatch('getTopicsData')
    },
    components:{
      TopicHead,
      Nav,
      Footer
    }
  }
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped>
  .wrap
    width 100%
    background: #F4F4F4
</style>
